package com.viamo.concilia.utils;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class ViamoNetFileUtils {
	
	 public static String getAppPath(){
         
         java.io.File currentDir = new java.io.File("");
         String dir = currentDir.getAbsolutePath();
         
         return dir;
 }

	public static void fileCopy(String sourceFile, String destinationFile) {

         try {
                 File inFile = new File(sourceFile);
                 File outFile = new File(destinationFile);

                 FileInputStream in = new FileInputStream(inFile);
                 FileOutputStream out = new FileOutputStream(outFile);

                 int c;
                 while( (c = in.read() ) != -1)
                         out.write(c);

                 in.close();
                 out.close();
         } catch(IOException e) {
                 System.err.println("Error al copiar el archivo");
         }
 }
}
